<nz-modal [(nzVisible)]="isVisible" [nzMaskClosable]="false" nzTitle="字典值" (nzOnCancel)="handleCancel()"
  [nzFooter]="dictionaryValueListFooter" nzWidth="1000" [nzBodyStyle]="{ height: '500px'}">

  <st #st [scroll]="{ y: '100%' }" [size]="TABLE_PARAMETER.size" [columns]="stColumns" [data]="tableData"
    [loading]="loading" [bordered]="true" [ps]="TABLE_PARAMETER.ps" [pi]="TABLE_PARAMETER.pi"
    [total]="TABLE_PARAMETER.page.total" [page]="TABLE_PARAMETER.page" (change)="change($event)">
    <ng-template st-row="number" let-row let-index="index">
      {{ ((st.pi ? st.pi : 1) - 1) * (st.ps ? st.ps : 0) + (index + 1) }}
    </ng-template>
    <ng-template st-row="available" let-row let-index="index">
      {{ row.available ? '可用' : '不可用' }}
    </ng-template>
    <ng-template st-row="operations" let-row let-index="index">
      <ng-container>
        <a (click)="update(row)">修改</a>
        <nz-divider nzType="vertical"></nz-divider>
      </ng-container>
      <ng-container>
        <nz-popconfirm (nzOnConfirm)="onDelete(row)" [nzTitle]="'是否要删除此行数据？'">
          <a nz-popconfirm>删除</a>
        </nz-popconfirm>
      </ng-container>
    </ng-template>
  </st>
  <ng-template #dictionaryValueListFooter>
    <button nz-button nzType="primary" (click)="addValue()"><i nz-icon nzType="plus"
        nzTheme="outline"></i>添加字典值</button>
    <button nz-button nzType="default" (click)="handleCancel()">关闭</button>
  </ng-template>
</nz-modal>

<!-- 修改或新增字典值 -->
<app-dictionary-value-detail #dictionaryValueDetailComponent [dictionaryId]="dictionaryId" (notification)="loadData()">
</app-dictionary-value-detail>
